package ca.etsmtl.log730.projet2Tests;

import ca.etsmtl.log730.projet2.connectors.clientserver.LinkHandler;
import ca.etsmtl.log730.projet2.connectors.clientserver.nodes.NodeEntry;
import ca.etsmtl.log730.projet2.connectors.clientserver.setup.ConnectionData;
import ca.etsmtl.log730.projet2.connectors.clientserver.setup.LocalServerData;
import ca.etsmtl.log730.projet2.users.User;
import ca.etsmtl.log730.projet2.view.JXMainFrame;

public class ClientTest {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		JXMainFrame jx = new JXMainFrame();
		LinkHandler lh = jx.getLinkHandler();
		NodeEntry ne = new NodeEntry();
		ne.setConnectionData(new LocalServerData(1000+(int)(Math.random()*1000d)));
		ne.setUser(new User("TIJO"));
		lh.getNodesMap().setCurrentNode(ne);
		lh.start();
		lh.connect(LocalServerData.loadLocalServerData());
		jx.setVisible(true);
	}
}
